#include <iostream>
using namespace std;
class Rectangle{
	public:
		double S;
		double C;
		void Get(double X,double Y,double A,double B);
		void getS();
		void getC();
		Rectangle operator+(const Rectangle &R);
		Rectangle operator*(const Rectangle &R);
	private:
		double x;
		double y;
		double a;
		double b;
};
void Rectangle::Get(double X,double Y,double A,double B){
	x=X;
	y=Y;
	a=A;
	b=B;
}
void Rectangle::getC(){
	C=2*(b-y+a-x);
}
void Rectangle::getS(){
	S=(b-y)*(a-x);
}
Rectangle Rectangle::operator+(const Rectangle &R){
	Rectangle temp;
	temp.C=this->C+R.C;
	return temp;
}
Rectangle Rectangle::operator*(const Rectangle &R){
	Rectangle temp;
	temp.S=this->S+R.S;
	return temp;
}
int main()
{
	Rectangle R1;
	Rectangle R2;
	double a,b,c,d;
	cin>>a>>b>>c>>d;
	R1.Get(a,b,c,d);
	cin>>a>>b>>c>>d;
	R2.Get(a,b,c,d);
	R1.getS();
	R1.getC();
	R2.getS();
	R2.getC();
	Rectangle R3;
	R3=R1+R2;
	R3=R1*R2;
	cout<<R3.C<<' '<<R3.S;
	return 0;
}
